home *** CD-ROM | disk | FTP | other *** search
- ;CREATE creates the file used by CAPTURE.COM for code coming from the KBWIN95
- ;virus under Windows 95.
-
- ;(C) 1995 American Eagle Publications, Inc., All Rights Reserved.
-
- ;Buffer size and location definitions for use with KBWIN95 and CAPTURE.
- BUF_LOC EQU 600H ;This works with Windows-95 Final Beta
- BUF_SIZE EQU 64 ;Size of buffer in words
-
- .model small
- .code
-
- ORG 100H
-
- START:
- call OPEN_FILE ;create command line file
- jc EXIT ;exit on error
- call CLOSE_FILE ;else close it
-
- xor ax,ax
- mov es,ax
- mov di,BUF_LOC
- mov cx,BUF_SIZE+3
- rep stosw
-
- EXIT:
- mov ax,4C00H ;exit to DOS
- int 21H
-
- ;This routine creates the file named on the command line and returns with
- ;c set if failure, nc if successful, and bx=handle.
- OPEN_FILE:
- mov ah,3CH ;create file r/w
- mov cx,0
- mov dx,OFFSET CAPFILE
- int 21H
- mov bx,ax ;handle to bx
- ret ;retur with c set if failure, else nc
-
- CAPFILE DB 'CAPTURE.CAP',0
-
- ;This function closes the file whose handle is in bx.
- CLOSE_FILE:
- mov ah,3EH
- int 21H
- ret
-
- END START
-